package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.WorkAttendanceMapper;
import com.ruoyi.system.domain.WorkAttendance;
import com.ruoyi.system.service.IWorkAttendanceService;
import com.ruoyi.common.core.text.Convert;

/**
 * 考勤信息Service业务层处理
 * 
 * @author 503i
 * @date 2021-05-04
 */
@Service
public class WorkAttendanceServiceImpl implements IWorkAttendanceService 
{
    @Autowired
    private WorkAttendanceMapper workAttendanceMapper;

    /**
     * 查询考勤信息
     * 
     * @param workAttendceId 考勤信息ID
     * @return 考勤信息
     */
    @Override
    public WorkAttendance selectWorkAttendanceById(Long workAttendceId)
    {
        return workAttendanceMapper.selectWorkAttendanceById(workAttendceId);
    }

    /**
     * 查询考勤信息列表
     * 
     * @param workAttendance 考勤信息
     * @return 考勤信息
     */
    @Override
    public List<WorkAttendance> selectWorkAttendanceList(WorkAttendance workAttendance)
    {
        return workAttendanceMapper.selectWorkAttendanceList(workAttendance);
    }

    /**
     * 新增考勤信息
     * 
     * @param workAttendance 考勤信息
     * @return 结果
     */
    @Override
    public int insertWorkAttendance(WorkAttendance workAttendance)
    {
        return workAttendanceMapper.insertWorkAttendance(workAttendance);
    }

    /**
     * 修改考勤信息
     * 
     * @param workAttendance 考勤信息
     * @return 结果
     */
    @Override
    public int updateWorkAttendance(WorkAttendance workAttendance)
    {
        return workAttendanceMapper.updateWorkAttendance(workAttendance);
    }

    /**
     * 删除考勤信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWorkAttendanceByIds(String ids)
    {
        return workAttendanceMapper.deleteWorkAttendanceByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除考勤信息信息
     * 
     * @param workAttendceId 考勤信息ID
     * @return 结果
     */
    @Override
    public int deleteWorkAttendanceById(Long workAttendceId)
    {
        return workAttendanceMapper.deleteWorkAttendanceById(workAttendceId);
    }
}
